The present invention relates to database systems, and more specifically, to compression and decompression techniques for use in database systems. Database systems manage large amounts of data, and commonly use data compression as a means to reduce the amount of disk and/or memory storage used to house data objects.
For example, the DB2® database system, which is available from International Business Machines Corporation of Armonk, N.Y., offers a storage optimization feature, which uses a combination of compression techniques to compress data on disk to decrease disk space and storage infrastructure requirements. Since disk storage systems can often be some of the most expensive components of a database solution, even a small reduction in the storage subsystem can result in substantial cost savings for the overall database solution.
One example of a commonly used compression technique is dictionary-based compression. Compression systems such as LZW, and other Huffman-coding based techniques are often applied at the row level, and sometimes also at the page level. When a row needs to be examined to see whether it qualifies a predicate, the row needs to be decompressed, the column(s) need to be located within the row, and finally the predicate(s) are applied to the decompressed data. The decompression typically expands rows or pages to several times their compressed size, and typically also involves a plethora of dictionary lookups and copying the dictionary entries into a buffer when reconstructing a page or a row. This not only consumes CPU resources, but also requires significant memory and/or cache. Therefore, it would be advantageous to have techniques that reduce the amount of CPU resources that are needed when only a portion of the compressed data needs to be accessed.